<?php
namespace App\Http\Controllers\Common;

use App\Http\Controllers\Controller;
use App\Repositories\Common\MapRepository;
use App\Http\Requests\Common\Map\GetAddressNameRequest;

class MapController extends Controller{

    public function getpca($pid, MapRepository $repository)
    {
        $lists = $repository->getPCA($pid);
        return success($lists->toArray());
    }

    public function getaddressname(GetAddressNameRequest $request, MapRepository $repository)
    {
        $ids = $request->get("ids");
        $idArr = explode(",", $ids);
        return success(['name'=>$repository->getAddressName($idArr)]);
    }

}